Optimal. Leaf size=53 \[ \frac{a^2 c \cos (e+f x)}{f}-\frac{a^2 c \cot (e+f x)}{f}-\frac{a^2 c \tanh ^{-1}(\cos (e+f x))}{f}+a^2 (-c) x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.120219, antiderivative size = 53, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 7, integrand size = 32, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.219, Rules used = {2950, 2710, 2592, 321, 206, 3473, 8} \[ \frac{a^2 c \cos (e+f x)}{f}-\frac{a^2 c \cot (e+f x)}{f}-\frac{a^2 c \tanh ^{-1}(\cos (e+f x))}{f}+a^2 (-c) x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2950
Rule 2710
Rule 2592
Rule 321
Rule 206
Rule 3473
Rule 8
Rubi steps
\begin{align*} \int \csc ^2(e+f x) (a+a \sin (e+f x))^2 (c-c \sin (e+f x)) \, dx &=(a c) \int \cot ^2(e+f x) (a+a \sin (e+f x)) \, dx\\ &=(a c) \int \left (a \cos (e+f x) \cot (e+f x)+a \cot ^2(e+f x)\right ) \, dx\\ &=\left (a^2 c\right ) \int \cos (e+f x) \cot (e+f x) \, dx+\left (a^2 c\right ) \int \cot ^2(e+f x) \, dx\\ &=-\frac{a^2 c \cot (e+f x)}{f}-\left (a^2 c\right ) \int 1 \, dx-\frac{\left (a^2 c\right ) \operatorname{Subst}\left (\int \frac{x^2}{1-x^2} \, dx,x,\cos (e+f x)\right )}{f}\\ &=-a^2 c x+\frac{a^2 c \cos (e+f x)}{f}-\frac{a^2 c \cot (e+f x)}{f}-\frac{\left (a^2 c\right ) \operatorname{Subst}\left (\int \frac{1}{1-x^2} \, dx,x,\cos (e+f x)\right )}{f}\\ &=-a^2 c x-\frac{a^2 c \tanh ^{-1}(\cos (e+f x))}{f}+\frac{a^2 c \cos (e+f x)}{f}-\frac{a^2 c \cot (e+f x)}{f}\\ \end{align*}
Mathematica [A] time = 0.0401381, size = 97, normalized size = 1.83 \[ -\frac{a^2 c \sin (e) \sin (f x)}{f}+\frac{a^2 c \cos (e) \cos (f x)}{f}-\frac{a^2 c \cot (e+f x)}{f}+\frac{a^2 c \log \left (\sin \left (\frac{e}{2}+\frac{f x}{2}\right )\right )}{f}-\frac{a^2 c \log \left (\cos \left (\frac{e}{2}+\frac{f x}{2}\right )\right )}{f}+a^2 (-c) x \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.038, size = 72, normalized size = 1.4 \begin{align*} -{a}^{2}cx+{\frac{{a}^{2}c\cos \left ( fx+e \right ) }{f}}-{\frac{{a}^{2}c\cot \left ( fx+e \right ) }{f}}+{\frac{{a}^{2}c\ln \left ( \csc \left ( fx+e \right ) -\cot \left ( fx+e \right ) \right ) }{f}}-{\frac{{a}^{2}ce}{f}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.969055, size = 93, normalized size = 1.75 \begin{align*} -\frac{2 \,{\left (f x + e\right )} a^{2} c + a^{2} c{\left (\log \left (\cos \left (f x + e\right ) + 1\right ) - \log \left (\cos \left (f x + e\right ) - 1\right )\right )} - 2 \, a^{2} c \cos \left (f x + e\right ) + \frac{2 \, a^{2} c}{\tan \left (f x + e\right )}}{2 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.05983, size = 263, normalized size = 4.96 \begin{align*} -\frac{a^{2} c \log \left (\frac{1}{2} \, \cos \left (f x + e\right ) + \frac{1}{2}\right ) \sin \left (f x + e\right ) - a^{2} c \log \left (-\frac{1}{2} \, \cos \left (f x + e\right ) + \frac{1}{2}\right ) \sin \left (f x + e\right ) + 2 \, a^{2} c \cos \left (f x + e\right ) + 2 \,{\left (a^{2} c f x - a^{2} c \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{2 \, f \sin \left (f x + e\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.2957, size = 185, normalized size = 3.49 \begin{align*} -\frac{6 \,{\left (f x + e\right )} a^{2} c - 6 \, a^{2} c \log \left ({\left | \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) \right |}\right ) - 3 \, a^{2} c \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + \frac{2 \, a^{2} c \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} + 3 \, a^{2} c \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} - 10 \, a^{2} c \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + 3 \, a^{2} c}{\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} + \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )}}{6 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]